package authentication.mappers;

import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/4/20 下午5:00
 * @UpdateDate:
 * @Description:
 */
@Mapper
public interface TestClsMapper {

    @Select("select * from `test`.test_cls")
    List<Map> getAll();

    @Insert("insert into `test`.test_cls(`cls`,`cls_doc`) values (#{row.cls},#{row.clsDoc})")
    int insert(@Param("row") Map<String,String> row);

    @Update("update table `test`.test_cls set cls_doc = #{row.clsDoc} where cls = #{row.cls}")
    int update(@Param("row") Map<String,String> row);

    @Insert("insert into pay_info(`uid`,`order_id`,`pay_amount`) values(#{row.uid},#{row.order_id},#{row.pay_amount})")
    int insertPayInfo(@Param("row") Map<String, Object> params);

    @Insert("insert into delivery_info(`order_id`,`delivery_id`,`status`) values(#{row.order_id},#{row.delivery_id},#{row.status})")
    int insertDeliveryInfo(@Param("row") Map<String, Object> params);
}
